import Vue from 'vue'
import App from './App'
import commonPicker from "@/component/commonPicker.vue"

// 引入vant
import Vant from 'vant'
Vue.use(Vant);
import 'vant/lib/index.less';

//引入vuex
import store from './store'
//把vuex定义成全局组件
Vue.prototype.$store = store;
Vue.config.productionTip = false
Vue.component('commonPicker', commonPicker);

// 绑定后退事件
const goBack = () => {
	uni.navigateBack({
		
	})
}
Vue.prototype.goBack = goBack

import HsSearch from '@/pages/components/search/index.js';
Vue.use(HsSearch);

// 隐藏钉钉导航栏
// import dingtalk from '@/utils/dingtalk.open.js';
// if (dingtalk.env.platform != 'notInDingTalk') {
// 	dingtalk.biz.navigation.hideBar({
// 		hidden: true, // true：隐藏，false：显示
// 		onSuccess: function(result) {},
// 		onFail: function(err) {}
// 	});
// }

// window.addEventListener('popstate', (e) => {
// 	if (dingtalk.env.platform != 'notInDingTalk') {
// 		dingtalk.config({})
// 		dingtalk.biz.navigation.hideBar({
// 			hidden: true, // true：隐藏，false：显示
// 			onSuccess: function(result) {},
// 			onFail: function(err) {}
// 		});
// 	}
// })

App.mpType = 'app';
const app = new Vue({
	...App,
	store,
})
app.$mount();
